package cn.js.ccit.flowersmall.order.mapper;

import cn.js.ccit.flowersmall.order.entity.GiftOrderEntity;
import cn.js.ccit.flowersmall.order.entity.OrderEntity;

import java.util.List;

public interface OrderMapper {
   // @Select("select * from orders where userName=#{userName}")
    List<OrderEntity> findOrders(String userName);

    //@Insert({ "insert into orders" +
    //        "(orderNo, userId, userName, amount, productName, productImage, productNum, createTime) " +
    //        "values" +
    //        "(#{orderNo}, #{userId}, #{userName}, #{amount}, #{productName}, #{productImage}, #{productNum}, #{createTime, jdbcType=TIMESTAMP})" })
    //@Options(useGeneratedKeys = true, keyProperty = "id")
    public int addOrder(OrderEntity order);
    List<GiftOrderEntity> findGiftOrders(String userName);
    public int addGiftOrder(GiftOrderEntity order);

}
